package com.tanhua.domain.mongo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.bson.types.ObjectId;
import org.springframework.data.mongodb.core.mapping.Document;

import java.io.Serializable;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Document("user_level")
public class UserLevel implements Serializable {
    private ObjectId id;
    private Long userId;
    private Integer level=1;
    public String getLevelName(){
        if (level==1){
            return "初级";
        }else if (level==2){
            return "中级";
        }else {
            return "高级";
        }
    }
}
